<% include ../public/page_header.html %>


    <div class="panel panel-default">
        <div class="panel-heading">
            角色授权
        </div>
        <div class="panel-body">
            <form action="/<%=adminPath%>/role/doAuth" method="post">
                <input type="hidden" name="_csrf" value="<%=csrf%>" />
                <input type="hidden" name="roleId" value="<%=roleId%>">
                <table class="table table-bordered">
                    <%for(var i=0;i<authList.length;i++){%>
                    <tr>
                        <td align="right" style="background: #D8E2FA; padding-right: 10px; width: 150px;">
                            <label>
                                <input type="checkbox" class="module_cbo" <%if(authList[i].checked){%>checked <%}%>  value="<%=authList[i].id%>" name="accessIds[]">&nbsp;&nbsp;
                                <%=authList[i].moduleName%>
                            </label>
                        </td>
                        <td>
                            <%for(var j=0;j<authList[i].accesses.length;j++){%>
                                &nbsp;&nbsp;
                                <label>
                                    <input type="checkbox" class="action_cbo" <%if(authList[i].accesses[j].checked){%>checked <%}%> value="<%=authList[i].accesses[j].id%>" name="accessIds[]">
                                    &nbsp;&nbsp;<%=authList[i].accesses[j].actionName%> </label>&nbsp;&nbsp;
                             <%}%>
                        </td>
                    </tr>
                    <%}%>
    
                </table>
                <br />
                <button type="submit" class="btn btn-primary">提交</button>

            </form>
        </div>


    </div>

    </body>

    </html>
    